/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import java.util.Iterator;
import java.util.List;
import persistence.rb_expence_persist;
import vo.rb_daily_expences;
import vo.rb_expence;

/**
 *
 * @author subin
 */
public class ExpenseController {
      public static ExpenseController getInstance() {
        
        return new ExpenseController();
    }
    
    public rb_expence create(rb_expence expence){
        rb_expence_persist.getInstance().insert(expence);
        return null;
    }
    
    public boolean insertAll(List<rb_expence> list) {
        Iterator it = list.iterator();
        while(it.hasNext()) {
            rb_expence exp = (rb_expence)it.next();
            this.create(exp);
        }
        return true;
    }
    
    public rb_expence update(rb_expence expence){
        
        return null;
    }
    
    public rb_expence[] fetchAll(){
        
        return null;
    }
    
    public String delete(rb_expence expence){
        
        return null;
    }
    
    public rb_expence fetch(String expenceId){
        
        return null;
    }
    
    public String insertExpence(rb_daily_expences dailyExpence){
        
        return null;
    }
    
    public List<String> fetchAllExpenceType() {
        
        return rb_expence_persist.getInstance().fetchAllExpenceType();
    }
   
}
